package com.orange.feign.api;

import com.orange.feign.hystrix.ServiceFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

// @FeignClient标识当前接口是一个Feign客户端
@FeignClient(value = "eureka-orange-two", fallback = ServiceFeignHystrix.class)
public interface ServiceFeign {

    // 通过Feign伪Http客户端调用eureka-orange提供的服务
    @GetMapping("/orange/feign/{name}")
    String sayHelloFromServiceFeignTwo(@PathVariable(value = "name") String name);
}
